#pragma once
#include "Socket.h"
struct tcp_info;  // 前置声明在命名空间外，否则会去命名空间内找实现
namespace xncc {
namespace foundation {
    class UnixDomainSocket final : public Socket
    {
      public:
        explicit UnixDomainSocket(const std::shared_ptr<XnccAddress>& addr) : Socket(addr) {}

        ~UnixDomainSocket() override;

        UnixDomainSocket(const UnixDomainSocket&&) = delete;
        UnixDomainSocket(const UnixDomainSocket&)  = delete;

        UnixDomainSocket& operator=(const UnixDomainSocket&)  = delete;
        UnixDomainSocket& operator=(const UnixDomainSocket&&) = delete;

        void bind() override;
        void listen() override;
        int  accept(std::shared_ptr<XnccAddress> peeraddr) override;
        void shutdownWrite();
    };
}  // namespace foundation
}  // namespace xncc